<template>
    <div class="alls">
        <lunbo></lunbo>
        <div class="home-main">
            <newhot :homeOne="homeOne"></newhot>
            <cucoming :homeTwo='homeTwo'></cucoming>
            <broadcast :homeThree='homeThree'></broadcast>
        </div>
        <footers></footers>
    </div>
</template>

<script>
import navs from '../components/navHeard'
import newhot from '../components/nowHot'
import broadcast from '../components/broadcast'
import cucoming from '../components/upcoming'
import footers from '../components/footer'
import lunbo from '../components/lunbo'
export default {
    name: 'home',
    data() {
        return {
            homeOne:[],
            homeTwo:[],
            homeThree:[]
        };
    },
    components:{
        lunbo,
        navs,
        newhot,
        broadcast ,
        cucoming,
        footers
    },
    mounted() {
        
    },
    methods: {
       homeMovies(){
           this.$http.get('/Mhomeovie').then(res=>{
               this.homeOne = res.data.splice(0,8)
               this.homeTwo = res.data.splice(0,8)
               this.homeThree = res.data.splice(0,6)
           }).catch(err=>{
               console.log(err);
           })
       }
    },
    created(){
        this.homeMovies()

        // login-test

        // let sess = sessionStorage.getItem('cookie-session')
        // let encodedData = window.decodeURIComponent(window.atob(sess))
        // console.log(encodedData);
    }
};
</script>

<style lang="scss" scoped>
</style>